<template>
  <div>
    <FormPanel  
        ref="formPanel"
        :list="initForm"   
        :cols="3"          
        :labelWidth="110"  
        :isSubmitBtn="false"  
        formType="show"
        class="mtop"
     />
  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  name:'infoBase',
  mixins: [dictionary],
  props:{
    id: {
      type: Number,
      required: true
    },
  },
  data() {
    return {
      initForm : this.initFormFun()
    };
  },
  mounted() {
    console.log(this.id) //获取到行id 
    //请求接口进行赋值，自己写吧
  },
  methods: {
    //搜索数据
    initFormFun(){
        return [{
              type: 'INPUT',
              label: '客户公司名称',
              fieldName: 'field1',
              initialValue: ''
            },
            {
              type: 'SELECT',
              label: '客户类型',
              fieldName: 'field2',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '客户性质',
              fieldName: 'field3',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '客户状态',
              fieldName: 'field4',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '客户来源',
              fieldName: 'field5',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'DATE',
              label: '建档时间',
              fieldName: 'field6',
              valueFormat: 'yyyy-MM-dd',
              initialValue: '',
            },
            {
              type: 'SELECT',
              label: '省份',
              fieldName: 'field7',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '市',
              fieldName: 'field8',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '区',
              fieldName: 'field9',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'TEXT_AREA',
              label: '详细地址',
              fieldName: 'field10',
              rows: 1,
              initialValue: '',
              disabled:true
            },
            {
              type: 'SELECT',
              label: '所属行业分类',
              fieldName: 'field11',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '行业地位',
              fieldName: 'field12',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '采购方式',
              fieldName: 'field13',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '意向车型',
              fieldName: 'field14',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'INPUT_NUMBER',
              label: '预计采购数量',
              fieldName: 'field141',
              initialValue: ''
            },
            {
              type: 'SELECT',
              label: '购车用途',
              fieldName: 'field15',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'DATE',
              label: '预计采购日期',
              fieldName: 'field16',
              valueFormat: 'yyyy-MM-dd',
              initialValue: ''
            },
            {
              type: 'SELECT',
              label: '预算来源',
              fieldName: 'field17',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'INPUT_NUMBER',
              label: '年度预算',
              fieldName: 'field171',
              initialValue: '',
              precision: 2
            },
            {
              type: 'SELECT',
              label: '上牌城市',
              fieldName: 'field18',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'SELECT',
              label: '是否跨区销售',
              fieldName: 'field19',
              initialValue: "",
              itemList: this.createDictList('1008')
            },
            {
              type: 'INPUT',
              label: '融资渠道',
              fieldName: 'field20',
              initialValue: ''
            },
            {
              type: 'INPUT',
              label: '客户关键联系人',
              fieldName: 'field21',
              initialValue: ''
            },
            {
              type: 'INPUT',
              label: '联系方式',
              fieldName: 'field22',
              initialValue: '',
              disabled:true
            },
            {
              type: 'TEXT_AREA',
              label: '备注',
              fieldName: 'field23',
              rows: 2,
              initialValue: ''
            }
          ]
    }
  },
}
</script>